package com.fyyg.common.converter;

import java.util.List;

import com.fyyg.common.page.PageData;
import com.fyyg.common.page.PageParam;

/**
 *
 * @desc
 * @author hang.ouyang
 * @date  16/03/13
 */
public class BaseConverterFactory {

    private static IBaseConverter converter = new BaseConverterImpl();

    public static <M, V> M convert2Do(V vo, Class<M> clazz) {
        return converter.convert2Model(vo, clazz);
    }

	public static <M, V> V convert2Vo(M model, Class<V> clazz) {
		return converter.convert2Vo(model, clazz);
	}

    public static <M, V> List<V> convert2ListData(List<M> m, Class<V> clazz) {
        return converter.convert2ListData(m, clazz);
    }
    
	public static <M, V> PageParam<M> convert2PageParam(PageParam<V> page,Class<M> clazz) {
		return converter.convert2PageParam(page, clazz);
	}
    
    public static <M, V> PageData<V> convert2PageData(PageData<M> m,Class<V> clazz) {
		return converter.convert2PageData(m, clazz);
	}

}
